package com.neusoft.movie.v_movies.activity;

import android.content.Context;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.neusoft.movie.v_movies.R;
import com.neusoft.movie.v_movies.common.Constants;
import com.neusoft.movie.v_movies.javabean.AboutmeBean;
import com.neusoft.movie.v_movies.listener.RetrofitListener;
import com.neusoft.movie.v_movies.model.UsersModel;

public class AboutUsActivity extends BaseActivity implements RetrofitListener {

    private TextView about_info;
    private ImageView left;
    private Context mContext;


    @Override
    void initViews() {
        setLayout(R.layout.activity_about_us);
        about_info = (TextView) findViewById(R.id.about_info);
        left=(ImageView) findViewById(R.id.left_button);

    }

    @Override
    void initData() {
        aboutme();
    }
    void aboutme()
    {
        UsersModel usersModel = new UsersModel();
        usersModel.aboutme(this);
    }


    @Override
    void initEvents() {
        left.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

    }

    @Override
    public void onSuccess(Object o, int flag) {
        switch(flag){
            case Constants.ABOUTME:
                AboutmeBean aboutmeBean=(AboutmeBean) o;
                about_info.setText(aboutmeBean.getAbout_info());
                break;
        }
    }

    @Override
    public void onFailed() {

    }
}
